<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模板插值</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="Application" style="text-align: center;">
        <h1 v-bind:id="id1">这里是模板的内容：{{count}}次点击</h1>
        <button v-on:click="clickButton">按钮</button>
        <h1>只能设置一次的用 v-once </h1>
        <h1 v-once>这里是模板的内容：{{count}}次点击</h1>
        <h1>输出纯html用 v-html</h1>
        <h1 v-once>这里是模板内容: <span v-html="outHtml"></span></h1>
    </div>

    <script>
        const App= {
            data(){
                return {
                    count:0,
                    outHtml: "<span style='color:red;'>0</span>",
                    id1:"h1"
                }
            },
            methods: {
                clickButton(){
                    this.count = this.count +1;
                }
            }
        }
        Vue.createApp(App).mount("#Application")
    </script>

</body>
</html>

